package ee.cafe;

import java.util.List;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: alvar
 * Date: Sep 23, 2009
 * Time: 2:37:20 PM
 * To change this template use File | Settings | File Templates.
 */
public class ChatMessageList {
  private static final List<ChatMessage> messages=new ArrayList<ChatMessage>();

  public static List<ChatMessage> getMessages() {
    return Collections.unmodifiableList(messages);
  }

  public static void addMessage(ChatMessage message) {
    synchronized (messages) {
      messages.add(message);
    }

  }
}
